import request from '@/config/axios'

// 评论举报记录 VO
export interface CommentReportVO {
  id: number // 主键
  userId: number // 用户id
  content: string // 内容
  commentId: number // 评论id
}

// 评论举报记录 API
export const CommentReportApi = {
  // 查询评论举报记录分页
  getCommentReportPage: async (params: any) => {
    return await request.get({ url: `/wine/comment-report/page`, params })
  },

  // 查询评论举报记录详情
  getCommentReport: async (id: number) => {
    return await request.get({ url: `/wine/comment-report/get?id=` + id })
  },
  // 查询评论举报记录详情
  getcomment: async (id: number) => {
    return await request.get({ url: `/wine/comment-report/get-comment?commentId=` + id })
  },
  // 新增评论举报记录
  createCommentReport: async (data: CommentReportVO) => {
    return await request.post({ url: `/wine/comment-report/create`, data })
  },

  // 修改评论举报记录
  updateCommentReport: async (data: CommentReportVO) => {
    return await request.put({ url: `/wine/comment-report/update`, data })
  },

  // 删除评论举报记录
  deleteCommentReport: async (id: number) => {
    return await request.delete({ url: `/wine/comment-report/delete?id=` + id })
  },

  // 导出评论举报记录 Excel
  exportCommentReport: async (params) => {
    return await request.download({ url: `/wine/comment-report/export-excel`, params })
  }
}